<?php

class Application_View_Helper_Getimg {
		
	public function getimg($src, $alt = "") {
		if((string)$src == '') {
			return;
		}
		
		if(strpos($src, 'http://') === false && strpos($src, 'https://') === false) {
			$size = getimagesize (APPLICATION_PATH . '/../' . $src);
		} else {
			$size = getimagesize($src);
		}
		return '<img src="' . $src . '" ' . $size[3] . ' alt="' . $alt . '" />';
	}
}